export default {
  namespaced: true,
  state: {
    musicList: JSON.parse(localStorage.getItem('music_List')) || [],
    play_way: JSON.parse(localStorage.getItem('play_way')) || 0
  },
  mutations: {
    // 播放列表数据本地存储
    addlist (state, data) {
      localStorage.setItem('music_List', JSON.stringify(data))
      state.musicList = data
    },
    // 播放方式本地存储
    changePlayWay (state, data) {
      localStorage.setItem('play_way', JSON.stringify(data))
      state.play_way = data
    }
  },
  actions: {

  }
}
